package com.kapfy.shortlink.admin.common.enums;

import com.kapfy.shortlink.admin.common.convention.errorcode.IErrorCode;

public enum UserErrorCodeEnums implements IErrorCode {

    USER_TOKEN_FAIL("A000200", "用户Token验证失败"),

    // ========== 二级宏观错误码 系统请求操作频繁 ==========
    FLOW_LIMIT_ERROR("A000300", "当前系统繁忙，请稍后再试"),

    USER_NULL("B000201", "用户记录不存在"),

    USER_NAME_EXIST("B000202", "用户名已存在"),

    USER_SAVE_ERROR("B000203", "用户新增失败");

    private final String code;

    private final String message;

    UserErrorCodeEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
